package edu.ncst.baseweb.mapper;

import edu.ncst.baseweb.dao.BorrowRecord;
import edu.ncst.baseweb.dao.User;
import edu.ncst.baseweb.dao.equ.Equ;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

@Mapper
public interface BorrowRecordMapper extends BaseMapper<BorrowRecord> {
    Equ getEquByEquId(@Param("equId")Integer equId);
    //获取设备id
    String getEquidById(@Param("id")String id);

    User getUserByUserId(@Param("userId") Integer userId);

    String getEquClassByBorrowId(@Param("equId")Integer equId);

    void updateStateById(@Param("id")Integer id,@Param("state") Integer state);

    void updateAnswerById(@Param("id")Integer id,@Param("answer") String answer);

    void updateAtimeById(@Param("id")Integer id,@Param("atime") Date atime);



}
